
clear




use "/Users/scottfabramson/Dropbox/Job Market Paper/IO Revisions/Replication_Files/Replication_Appendix/A_Table_3/data_table_a3.dta"





ssc install ivreg2
ssc install qvf
ssc install xtivreg2



tsset ID Year

tabulate Year, g(y)
generate instrument= abs(Temp-10.5)
generate treatment= log(Urban_Pop+.001)






*** Column 1 ***
ivreg2 Entrants S R O IT IB CE C  (treatment =instrument), robust cluster(ID) 


	*** Fstat ***
	ivreg2 Entrants S R O IT IB CE C  (treatment =instrument), robust cluster(ID) ffirst




*** Column 2 ***
ivreg2 Entrants S R O IT IB CE C y1 y2 y3 y4 y5 y6 (treatment =instrument), robust cluster(ID) 


	*** Fstat ***
	ivreg2 Entrants S R O IT IB CE C y1 y2 y3 y4 y5 y6 (treatment =instrument), robust cluster(ID) ffirst


*** Column 3 ***

ivreg2 Entrants S R O IT IB CE C y1 y2 y3 y4 y5 y6 River_Length (treatment =instrument), robust cluster(ID) 

		*** Fstat ***
		ivreg2 Entrants S R O IT IB CE C y1 y2 y3 y4 y5 y6 River_Length (treatment =instrument), robust cluster(ID) ffirst





*** Column 4 ***

ivreg2 Entrants (treatment =instrument) if(CE==1), robust cluster(ID)

		*** FStat ***
		ivreg2 Entrants (treatment =instrument) if(CE==1), robust cluster(ID) ffirst




*** Column 5 ***


		

ivreg2 Entrants y1 y2 y3 y4 y5 y6 (treatment =instrument) if(CE==1), robust cluster(ID)

		*** FStat ***
		
		ivreg2 Entrants y1 y2 y3 y4 y5 y6 (treatment =instrument) if(CE==1), robust cluster(ID) ffirst




*** Column 6 ***

ivreg2 Entrants y1 y2 y3 y4 y5 y6 X Y (treatment =instrument) if(CE==1), robust cluster(ID)

		*** Fstat ***
		
		ivreg2 Entrants y1 y2 y3 y4 y5 y6 X Y (treatment =instrument) if(CE==1), robust cluster(ID) ffirst


*** Column 7 ***

xtivreg2 Entrants (treatment =instrument) if(CE==1), fe robust cluster(ID)


		*** Fstat ***
		xtivreg2 Entrants (treatment =instrument) if(CE==1), fe robust cluster(ID) ffirst


		
*** Column 8 ***

ivreg2 Entrants (treatment =instrument) if(CE==0), robust cluster(ID)

	*** Fstat ***
	ivreg2 Entrants (treatment =instrument) if(CE==0), robust cluster(ID) ffirst

	

*** Column 9 ***
ivreg2 Entrants y1 y2 y3 y4 y5 y6 (treatment =instrument) if(CE==0), robust cluster(ID)

	*** Fstat ***
	ivreg2 Entrants y1 y2 y3 y4 y5 y6 (treatment =instrument) if(CE==0), robust cluster(ID) ffirst


*** Column 10 ***

ivreg2 Entrants y1 y2 y3 y4 y5 y6 X Y (treatment =instrument) if(CE==0), robust cluster(ID)

	*** Fstat ***
	ivreg2 Entrants y1 y2 y3 y4 y5 y6 X Y (treatment =instrument) if(CE==0), robust cluster(ID) ffirst



*** Column 10 ***
xtivreg2 Entrants (treatment =instrument) if(CE==0), fe robust cluster(ID)

	*** Fstat ***
	xtivreg2 Entrants (treatment =instrument) if(CE==0), fe robust cluster(ID) ffirst


